package com.br.eaccount.code.dao;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.br.eaccount.code.model.CommCodeModel;
import com.br.eaccount.code.model.CommGrpCodeModel;

@Repository
public class CodeDao{
	
	private final Logger logger = LoggerFactory.getLogger(getClass());
	
	@Autowired
	private SqlSessionTemplate sqlSession;
	
	/**
	 * 그룸 코드를 조회
	 * @param cndModel
	 * @return
	 */
	public List<CommGrpCodeModel> inqireGroupCodeList(CommGrpCodeModel grpCodeModel){
		logger.debug("::::::::::::::: inqireGroupCodeList :::::::::::::::::");
		return sqlSession.selectList("CodeMapper.inqireCommGrpCodeList");
	}
	
	public List<CommCodeModel> inqireCodeList(String grpCodeId){
		logger.debug("::::::::::::: inqireCodeList ::::::::::::::");
		return sqlSession.selectList("CodeMapper.inqireCommCodeList", grpCodeId);
	}
	
	
	
}
